package cn.nbt.busManage.dao.repository;

import cn.nbt.busManage.model.entity.Driver;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface DriverRepository extends CrudRepository<Driver,Integer> {

    @Query("select d from Driver d where d.driverName like %?1%")
    List<Driver> findByDriverName(String driverName);
}
